package first.group.ssh.gui.util;

import javax.swing.text.BadLocationException;
import javax.swing.text.Document;

public class DocumentUtil {
    public static String getText(Document document) {
        String txt;
        try {
            txt = document.getText(0, document.getLength());
        } catch (BadLocationException e) {
            txt = null;
        }
        return txt;
    }
}
